/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.hera.process.form.domain;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author cmontes
 */
@Embeddable
public class DynaformFieldPK implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = 4457814751331281669L;
	@Basic(optional = false)
    @Column(name = "ID_DYNAFORM")
    private Long idDynaform;
    @Basic(optional = false)
    @Column(name = "ID_FIELD")
    private Long idField;

    public DynaformFieldPK() {
    }

    public DynaformFieldPK(Long idDynaform, Long idField) {
        this.idDynaform = idDynaform;
        this.idField = idField;
    }

    public Long getIdDynaform() {
        return idDynaform;
    }

    public void setIdDynaform(Long idDynaform) {
        this.idDynaform = idDynaform;
    }

    public Long getIdField() {
        return idField;
    }

    public void setIdField(Long idField) {
        this.idField = idField;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idDynaform != null ? idDynaform.hashCode() : 0);
        hash += (idField != null ? idField.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        
        if (!(object instanceof DynaformFieldPK)) {
            return false;
        }
        DynaformFieldPK other = (DynaformFieldPK) object;
        if ((this.idDynaform == null && other.idDynaform != null) || (this.idDynaform != null && !this.idDynaform.equals(other.idDynaform))) {
            return false;
        }
        if ((this.idField == null && other.idField != null) || (this.idField != null && !this.idField.equals(other.idField))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.hera.process.form.domain.DynaformFieldPK[ idDynaform=" + idDynaform + ", idField=" + idField + " ]";
    }
    
}
